import Vue from 'vue'
import VueRouter from 'vue-router'
const home = () => import('@/views/home/home.vue')
const login = () => import('@/views/login/login.vue')
const company = () => import('@/views/home/company/company.vue')
const find = () => import('@/views/home/find/find.vue')
const my = () => import('@/views/home/my/my.vue')
const question = () => import('@/views/home/question/question.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: login
  },
  {
    path: '/home',
    component: home,
    redirect: '/find',
    children: [
      { path: '/company', component: company },
      { path: '/question', component: question },
      { path: '/find', component: find },
      { path: '/my', component: my }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
